package com.xge.commponet_chat.vm

import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import com.xge.common_libary.bean.BFRInfoBean
import com.xge.common_libary.bean.CovertNumBean
import com.xge.common_libary.bean.HealthGuardBean
import com.xge.common_libary.bean.JTWFInfoBean
import com.xge.common_libary.bean.KuaiDiInfoBean
import com.xge.common_libary.bean.PengYouQuanBean
import com.xge.common_libary.bean.PhoneQueryBean
import com.xge.common_libary.bean.QiaoMenInfoBean
import com.xge.common_libary.bean.SFZInfoBean
import com.xge.common_libary.bean.SolarTermsInfoBean
import com.xge.common_libary.bean.SurnameInfoBean
import com.xge.common_libary.bean.YaoPinInfoBean
import com.xge.common_libary.http.ApiResult
import com.xge.common_libary.http.RetrofitClient
import com.xge.common_libary.http.safeApiCall
import kotlinx.coroutines.launch

class WChatViewModel : ViewModel() {
    private val key = "8112b172e5582ef9a754a0ee751404ba"

    //手机号码查询
    var pyqInfo = MutableLiveData<ApiResult<PengYouQuanBean>>()
    fun pyqInfo() {
        viewModelScope.launch {
            val result = safeApiCall { RetrofitClient.apiService.pengyouquan(key) }
            pyqInfo.postValue(result)
        }
    }
}